begintownscript;
variables;
short choice,i,j,timer,xloc,yloc,xstart,ystart,xend,yend,xradius,yradius;

body;
beginstate init_state;
timer = 0;
i = 0;
while(char_ok(i) == 0){
	i = i + 1;
}
if(in_horse() == -1){
	activate_hidden_group(1);
	relocate_character(i,23,44);
	force_view_center(23,44);
}
else{
	force_view_center(23,44);
	relocate_character(i,22,44);
}
set_character_facing(i,0);
force_instant_terrain_redraw(); 
reset_dialog();
add_dialog_str(0,"The crowd ahead was nearly wall-to-wall people. There was no way I could ride a horse through that without trampling somebody.",0);
add_dialog_str(1,"I dismounted and began searching for a place to leave the animal while I went on ahead. A brightly painted sign caught my attention. I pushed through the crowd on my way towards it.",0);
add_dialog_str(2,"_The Swinging Scoundrel_ the sign read. A man with a noose about his neck was painted above the inn's name. Adorable.",0);
add_dialog_str(3,"I moved to one of the hitching posts out front and secured the reigns to it. It was probably reserved for customers, although the thought didn't cross my mind at the time.",0);
add_dialog_str(4,"This taken care of, I proceeded to make my way towards the source of the crowd.",0);
add_dialog_choice(0,"OK");
choice = run_dialog(1);
//set_char_dialogue_pic(73,307,0);
set_char_dialogue_pic(74,307,0);

break;

beginstate exit_state;
break;

beginstate start_state;
if(get_flag(28,0) == 1){
	timer = timer + 1;
	if(timer == 100){
		if(get_flag(28,1) == 0)
			message_dialog("I wandered through the crowd, but was unable to get any closer to the platform in the center of the square. Every opening in the crowd was almost instantly filled in with more warm bodies.","However, I thought I saw a gap in the crowd at the south end of the platform, right up front and center. I shoved my way past the surging townsfolk around me as I headed that way.");
		else
			message_dialog("I thought I spotted a break in the crowd at the south end of the platform. If I could reach it I'd have a good view of whatever was happening here.","");
		set_flag(28,1,1);
		timer = 0;
	}
}
if(get_flag(28,2) == 2){
	reset_dialog();
	add_dialog_str(0,"The doors had been thrown open, and a stream of guards filed out. In the center of the procession were several manacled men and women.",0);
	add_dialog_str(1,"The rest of the crowd noticed their presence simultaneously, erupting into a deafening roar. The procession moved forward towards the platform, right into the thickest part of the crowd.",0);
	add_dialog_str(2,"Somehow the densely packed onlookers made room for them to pass, parting as they approached and falling back into place behind them the moment they were past.",0);
	add_dialog_str(3,"So it was that the procession reached the platform unhindered. Their purpose gradually dawned on me-- a lot of the things the man had said made no sense to me, but I was sure that he'd called it an execution.",0);
	add_dialog_str(4,"Was that what I'd come to see? I looked on with horrified fascination.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	activate_hidden_group(2);
	force_view_center(25,18);
	force_instant_terrain_redraw();

	reset_dialog();
	add_dialog_str(0,"The crowd had begun to chant as the procession climbed the steps to the top of the platform. Each prisoner was led to one of the t-shaped posts-- the gallows. The word popped into my head although I'm not sure where I heard it.",0);
	add_dialog_str(1,"'We hunted every last one of those sons of bitches down. Left them hanging there to rot. Justice has been served, your folks can rest in peace, Adrianna.'",0);
	add_dialog_str(2,"I struggled to push away the memories that were bubbling up from the depths of my mind. Fortunately the man next to me spoke up again, giving me an excuse to look away from the gallows and the memories they had stirred up.",0);
	add_dialog_choice(0,"Wait, what did you say?");
	choice = run_dialog(1); 

	set_flag(28,2,3);
	erase_char(74);
	activate_hidden_group(3);
	set_char_dialogue_pic(73,307,0);
}
if(get_flag(28,2) == 4){
	set_flag(28,2,5);
	force_view_center(25,18);
	force_instant_terrain_redraw();
	
	spawn_creature(85);
	put_sparkles_on_char(85,11,10);
	run_animation();
	
	set_character_pose(85,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(85),char_loc_y(85),char_loc_x(58),char_loc_y(58),5);
	put_effect_on_char(58,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-84);
	set_character_pose(58,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(58,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(58,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(58,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(58);
	set_character_pose(85,2);
	force_instant_terrain_redraw();

	reset_dialog();
	add_dialog_str(0,"My thoughts were interrupted by the twang of a bowstring. An arrow seemed to grow out of the chest of one of the guards, sending him toppling off the platform.",0);
	add_dialog_str(1,"For a moment everything seemed frozen. Then pandemonium erupted.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	spawn_creature(51);
	put_sparkles_on_char(51,11,10);
	run_animation();
	
	set_character_pose(51,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(51),char_loc_y(51),char_loc_x(6),char_loc_y(6),5);
	put_effect_on_char(6,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(6,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(6,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(6,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(6,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(6);
	set_character_pose(51,2);
	force_instant_terrain_redraw();
	
	spawn_creature(71);
	put_sparkles_on_char(71,11,10);
	run_animation();
	
	set_character_pose(71,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(71),char_loc_y(71),char_loc_x(65),char_loc_y(65),5);
	put_effect_on_char(65,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(65,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(65,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(65,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(65,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(65);
	set_character_pose(71,2);
	force_instant_terrain_redraw();
	
	
	spawn_creature(70);
	put_sparkles_on_char(70,11,10);
	run_animation();
	
	set_character_pose(70,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(70),char_loc_y(70),char_loc_x(10),char_loc_y(10),5);
	put_effect_on_char(10,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-84);
	set_character_pose(10,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(10,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(10,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(10,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(10);
	set_character_pose(70,2);
	force_instant_terrain_redraw();
	
	spawn_creature(52);
	put_sparkles_on_char(52,11,10);
	run_animation();
	
	set_character_pose(52,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(52),char_loc_y(52),char_loc_x(59),char_loc_y(59),5);
	put_effect_on_char(59,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(59,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(59,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(59,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(59,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(59);
	set_character_pose(52,2);
	force_instant_terrain_redraw();
	
	spawn_creature(17);
	put_sparkles_on_char(17,11,10);
	run_animation();
	
	set_character_pose(17,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(17),char_loc_y(17),char_loc_x(57),char_loc_y(57),5);
	put_effect_on_char(57,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(57,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(57,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(57,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(57,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(57);
	set_character_pose(17,2);
	force_instant_terrain_redraw();
	
	spawn_creature(53);
	put_sparkles_on_char(53,11,10);
	run_animation();
	
	set_character_pose(53,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(53),char_loc_y(53),char_loc_x(37),char_loc_y(37),5);
	put_effect_on_char(37,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-84);
	set_character_pose(37,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(37,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(37,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(37,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(37);
	set_character_pose(53,2);
	force_instant_terrain_redraw();


	reset_dialog();
	add_dialog_str(0,"Bolts fired from somewhere out in the crowd rained down on the guards. The crowd, which had been shocked into momentary silence, roared again.",0);
	add_dialog_str(1,"This time nobody was jeering. People scrambled over one another in a mad dash to get as far from the gallows as possible.",0);
	add_dialog_str(2,"It crossed my mind that I too should flee this place, but I couldn't take my eyes off the gallows. Pierced guards screamed in agony, townsfolk shrieked in terror and the officer in charge was bellowing orders in an effort to organize a defense.",0);
	add_dialog_str(3,"And I just stood in dumb silence.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	set_incidental_sound(1);
	set_character_pose(1001,2);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(7,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(7),char_loc_y(7),char_loc_x(85),char_loc_y(85),5);
	put_effect_on_char(85,12,1,2);
	run_animation_sound(14);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(85,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(85,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(85,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(85,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(85);
	set_character_pose(7,2);
	force_instant_terrain_redraw();

	set_character_pose(17,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(17),char_loc_y(17),char_loc_x(7),char_loc_y(7),5);
	put_effect_on_char(7,12,1,2);
	run_animation_sound(91);	
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(7,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(7,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(7,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(7,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(7);
	set_character_pose(17,2);
	force_instant_terrain_redraw();
	
	
	set_character_pose(64,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(64),char_loc_y(64),char_loc_x(52),char_loc_y(52),5);
	put_effect_on_char(52,12,1,2);
	run_animation_sound(91);
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(52,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(52,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(52,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(52,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(52);
	set_character_pose(64,2);
	force_instant_terrain_redraw();
	
	set_character_pose(53,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(53),char_loc_y(53),char_loc_x(61),char_loc_y(61),5);
	put_effect_on_char(61,12,1,2);
	run_animation_sound(91);
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(61,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(61,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(61,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(61,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(61);
	set_character_pose(53,2);
	force_instant_terrain_redraw();
	
	set_character_pose(64,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(64),char_loc_y(64),char_loc_x(53),char_loc_y(53),5);
	put_effect_on_char(53,12,1,2);
	run_animation_sound(91);
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(53,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(53,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(53,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(53,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(53);
	set_character_pose(64,2);
	force_instant_terrain_redraw();
	
		set_character_pose(41,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(41),char_loc_y(41),char_loc_x(70),char_loc_y(70),5);
	put_effect_on_char(70,12,1,2);
	run_animation_sound(91);
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(70,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(70,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(70,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(70,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(70);
	set_character_pose(41,2);
	force_instant_terrain_redraw();

	
	set_character_pose(71,1);
	force_instant_terrain_redraw();
	put_straight_zap(char_loc_x(71),char_loc_y(71),char_loc_x(9),char_loc_y(9),5);
	put_effect_on_char(9,12,1,2);
	run_animation_sound(91);
	pause(1);
	
	run_animation_sound(-29);
	set_character_pose(9,11);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(9,12);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(9,13);
	force_instant_terrain_redraw();
	pause(1);
	
	set_character_pose(9,14);
	force_instant_terrain_redraw();
	pause(1);
	
	//erase_char(9);
	set_character_pose(71,2);
	force_instant_terrain_redraw();
	
	play_sound(117);

	play_sound(116);
	play_sound(116);
	play_sound(116);
	play_sound(116);
	
	reset_dialog();
	add_dialog_str(0,"A terrific clamor was coming from the south. A rattling, thumping, roaring sound that sent any townsfolk that hadn't fled yet into a mad scurry for cover.",0);
	add_dialog_str(1,"Finding myself alone in the street, I pried my eyes from the gallows and slowly turned to see the source of the racket.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	xstart = char_loc_x(i) - 10;
	xloc = 0;
	xend = char_loc_x(i) + 10;
	ystart = char_loc_y(i) - 10;
	yloc = 0;
	yend = char_loc_y(i) + 12;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	
	xstart = char_loc_x(i) - 9;
	xloc = 0;
	xend = char_loc_x(i) + 9;
	ystart = char_loc_y(i) - 9;
	yloc = 0;
	yend = char_loc_y(i) + 11;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	
	set_terrain(25,32,490);
	set_character_facing(i,4);
	force_view_center(25,22);
	set_total_visibility(0);
	force_instant_terrain_redraw();
	
	play_sound(116);
	play_sound(-116);
	set_terrain(25,32,0);
	set_terrain(25,31,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 8;
	xloc = 0;
	xend = char_loc_x(i) + 8;
	ystart = char_loc_y(i) - 8;
	yloc = 0;
	yend = char_loc_y(i) + 10;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);

	play_sound(116);
	play_sound(-116);
	set_terrain(25,31,0);
	set_terrain(25,30,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 7;
	xloc = 0;
	xend = char_loc_x(i) + 7;
	ystart = char_loc_y(i) - 7;
	yloc = 0;
	yend = char_loc_y(i) + 9;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);
	
	reset_dialog();
	add_dialog_str(0,"It was a two-horse cart, filled with blue-armored men bearing a strangely familiar flag emblem.",0);
	add_dialog_str(1,"My mind was moving so slowly. I couldn't think. I couldn't move.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	play_sound(116);
	play_sound(-116);
	set_terrain(25,30,0);
	set_terrain(25,29,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 6;
	xloc = 0;
	xend = char_loc_x(i) + 6;
	ystart = char_loc_y(i) - 6;
	yloc = 0;
	yend = char_loc_y(i) + 8;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);

	play_sound(116);
	play_sound(-116);
	set_terrain(25,29,0);
	set_terrain(25,28,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 5;
	xloc = 0;
	xend = char_loc_x(i) + 5;
	ystart = char_loc_y(i) - 5;
	yloc = 0;
	yend = char_loc_y(i) + 7;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);

	reset_dialog();
	add_dialog_str(0,"The courtyard had fallen silent except for the sound of my own heavy breathing and the pounding of the horses' hooves.",0);
	add_dialog_str(1,"The horses' flaring nostrils and rolling eyes drew closer. They were coming straight at me. But still I didn't make to move.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	play_sound(116);
	play_sound(-116);
	set_terrain(25,28,0);
	set_terrain(25,27,490);
	force_instant_terrain_redraw();

	xstart = char_loc_x(i) - 4;
	xloc = 0;
	xend = char_loc_x(i) + 4;
	ystart = char_loc_y(i) - 4;
	yloc = 0;
	yend = char_loc_y(i) + 6;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);

	play_sound(116);
	play_sound(-116);
	set_terrain(25,27,0);
	set_terrain(25,26,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 3;
	xloc = 0;
	xend = char_loc_x(i) + 3;
	ystart = char_loc_y(i) - 3;
	yloc = 0;
	yend = char_loc_y(i) + 5;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);

	reset_dialog();
	add_dialog_str(0,"The cart was almost on top of me. The horses must have realized that they were going to collide with me, but the frenzied whipping of the driver didn't allow them to turn their course.",0);
	add_dialog_str(1,"Or maybe their minds were moving as slowly as mine. The realization struck me that I'd waited too long-- that even if I acted now I would not avoid the cart.",0);
	add_dialog_str(2,"It was a matter of fact realization. There was no regret or fear or desperation accompanying it, just a knowledge of what would happen next.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	
	play_sound(116);
	play_sound(-116);
	set_terrain(25,26,0);
	set_terrain(25,25,490);
	force_instant_terrain_redraw();

	xstart = char_loc_x(i) - 2;
	xloc = 0;
	xend = char_loc_x(i) + 2;
	ystart = char_loc_y(i) - 2;
	yloc = 0;
	yend = char_loc_y(i) + 4;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		set_height(xstart + xloc,ystart,5);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		set_height(xstart,ystart + yloc,5);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		set_height(xend - xloc,yend,5);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		set_height(xend,yend - yloc,5);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);
	
	play_sound(116);
	play_sound(-116);
	set_terrain(25,25,0);
	set_terrain(25,24,490);
	force_instant_terrain_redraw();
	
	xstart = char_loc_x(i) - 1;
	xloc = 0;
	xend = char_loc_x(i) + 1;
	ystart = char_loc_y(i) - 1;
	yloc = 0;
	yend = char_loc_y(i) + 3;
	while((xloc + xstart) < xend || (yloc + ystart) < yend){
		set_height(xstart + xloc,ystart,5);
		set_height(xstart,ystart + yloc,5);
		set_height(xend - xloc,yend,5);
		set_height(xend,yend - yloc,5);
		set_terrain(xstart + xloc,ystart,1);
		erase_char(char_on_loc(xstart + xloc,ystart));
		set_terrain(xstart,ystart + yloc,1);
		erase_char(char_on_loc(xstart,ystart + yloc));
		set_terrain(xend - xloc,yend,1);
		erase_char(char_on_loc(xend - xloc,yend));
		set_terrain(xend,yend - yloc,1);
		erase_char(char_on_loc(xend,yend - yloc));
		if((xstart + xloc) < xend)
				xloc = xloc + 1;
		if((ystart + yloc) < yend)
			yloc = yloc + 1;
	}
	force_instant_terrain_redraw();
	pause(2);
	
	reset_dialog();
	add_dialog_str(0,"For once I knew exactly what was coming.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	message_dialog("But it didn't come.","");
	put_boom_on_space(25,24,1,0);
	run_animation_sound(152);
	play_sound(117);
	pause(1);
	
	message_dialog("An explosion went off in the back of the cart, launching blue armored men in all directions. The cart was sent skidding off track, riding precariously on two wheels for several yards and staying upright only by a miracle.","I felt the rush of air as the wheels skimmed past my face. Then something slammed into me from behind, sending me sprawling to the ground.");
	message_dialog("_You're alright-- oh thank fate. We gotta get the hell out of here._","I felt myself being lifted and propelled forward, half stumbling under my own power and half being dragged. Dazed and confused, I allowed myself to be guided by my benefactor, whoever it was.");

	relocate_character(i,41,41);
	force_view_center(41,41);
	set_character_facing(i,6);
	set_character_pose(i,14);
	force_instant_terrain_redraw();
	pause(3);

	reset_dialog();
	add_dialog_str(0,"The next thing I knew I was sitting in an alley, the red haired man from earlier standing over me.",0);
	add_dialog_str(1,"_What the hell were you doing? Were you trying to get yourself killed back there....? Never mind, forget about it. You aren't hurt, that's what matters. Can you walk? Are you feeling well enough to walk?_",0);
	add_dialog_choice(0,"What the hell just happened?");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"_You almost got ran down by a horse cart-- and did remarkably little to try to prevent it._",0);
	add_dialog_str(1,"_No matter-- fortunately you're still alive. But these are things that should be discussed elsewhere._",0);
	add_dialog_choice(0,"Alright, well I can stand I think.");
	choice = run_dialog(1);

	set_character_pose(i,0);
	force_instant_terrain_redraw();

}
break;

	

break;

beginstate 10;
if(in_horse() > -1){
	print_str_color("You cannot take a horse here.",1);
	block_entry(1);
}
break;

beginstate 11;
message_dialog("I didn't know why all these people had gathered here, but now that I was here I found myself drawn in towards the source of attraction to the north.","");
block_entry(1);
break;

beginstate 12;
if(get_flag(28,0) == 0){
	set_flag(28,0,1);
	reset_dialog();
	add_dialog_str(0,"The courtyard ahead was dominated by a massive stone building that spanned the entire north end of the square. The main building was several stories tall, and a great spiraling tower soared into the sky another twenty stories at least.",0);
	add_dialog_str(1,"It was constructed of rough stone blocks and was designed simply, with narrow windows spaced evenly across each floor and little imagination in its strictly functional form.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"This wasn't the reason for the hubbub, though. Everyone's attention was focused on a small wooden platform sitting at the steps of the colossal stone building.",0);
	add_dialog_str(1,"The platform was empty, but was ringed by guards with their halberds held out to ward back the surging crowd. I waded further into the boiling human sea, struggling to reach the platform and discover what was going on.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
}
break;

beginstate 13;
if(get_flag(28,2) == 0){
	block_entry(1);
	set_total_visibility(1);
	set_flag(28,2,1);
	relocate_character(i,25,22);
	set_character_facing(i,0);
	force_instant_terrain_redraw();
	message_dialog("One last squeeze between a pair of sweaty dock men brought me to the space I'd spotted. Without all the heads in front of me I could finally behold the stage.","It was empty, to my great disappointment. There were five t-shaped poles sticking out of the platform, but I doubted that was the reason everyone had come here. I was about to turn and go, but a voice from the crowd brought me to a halt.");
}

break;

beginstate 14;
block_entry(1);
message_dialog("I'd already reached the source of the commotion, no point in wandering off into the city.","");
break;

beginstate 15;
if(get_flag(28,2) > 0)
	block_entry(1);
break;

beginstate 16;
move_to_new_town(29,33,38);
break;

beginstate 100;
block_entry(1);
break;